﻿@model MvcApplication2.Models.Sanpham

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Sanpham</legend>

        @Html.HiddenFor(model => model.SanphamID)

        <div class="editor-label">
            @Html.LabelFor(model => model.LoaisanphamID, "Loaisanpham")
        </div>
        <div class="editor-field">
            @Html.DropDownList("LoaisanphamID", String.Empty)
            @Html.ValidationMessageFor(model => model.LoaisanphamID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.NhacungcapID, "Nhacungcap")
        </div>
        <div class="editor-field">
            @Html.DropDownList("NhacungcapID", String.Empty)
            @Html.ValidationMessageFor(model => model.NhacungcapID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Tensanpham)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Tensanpham)
            @Html.ValidationMessageFor(model => model.Tensanpham)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Gianhap)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Gianhap)
            @Html.ValidationMessageFor(model => model.Gianhap)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Giaban)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Giaban)
            @Html.ValidationMessageFor(model => model.Giaban)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Anhminhhoa)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Anhminhhoa)
            @Html.ValidationMessageFor(model => model.Anhminhhoa)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
